//
//  BasicTabBarController.m
//  manShow
//
//  Created by 陈荣科 on 16/4/10.
//  Copyright © 2016年 crk. All rights reserved.
//

#import "BasicTabBarController.h"
#import "SingleProductController.h"
#import "AllRoundTableViewController.h"
#import "MineTableViewController.h"
#import "SelectViewController.h"
#import "MatchViewController.h"

@interface BasicTabBarController ()

@end

@implementation BasicTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //挑选的控制器
    SelectViewController *selectVC = [[SelectViewController alloc] init];
    selectVC.title = @"精选";
    selectVC.tabBarItem.title = @"挑选";
    [self selectController:selectVC];
    
    //单品控制器
    SingleProductController *singleProVC = [[SingleProductController alloc] init];
    singleProVC.title = @"单品";
    singleProVC.tabBarItem.title = @"单品";
    [self selectController:singleProVC];
    
    //搭配控制器
    MatchViewController *matchVC = [[MatchViewController alloc] init];
    matchVC.title = @"搭配";
    matchVC.tabBarItem.title = @"搭配";
    [self selectController:matchVC];
    
    //周围控制器
    AllRoundTableViewController *AllRoundVC = [[AllRoundTableViewController alloc] init];
    AllRoundVC.title = @"发现";
    AllRoundVC.tabBarItem.title = @"周围";
    [self selectController:AllRoundVC];
    //我的控制器
    MineTableViewController *mineVC = [[MineTableViewController alloc] init];
    mineVC.title = @"我的";
    mineVC.tabBarItem.title = @"我的";
    [self selectController:mineVC];
    
    
}
//设置每个tabbarButton的控制器
- (void) selectController:(id)controller{

    UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController:controller];
    [self addChildViewController:naVC];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
